package com.ztjy.market.biz;

import com.github.pagehelper.PageInfo;
import com.ztjy.bean.Orderdetails;
import com.ztjy.bean.Orders;

import java.sql.Date;
import java.util.List;


public interface OrdersBiz {
    /**
     * 模糊查询 分頁   查询字段：订单编号，客户姓名，订购时间区间段，订购金额区间段，审核状态
     * @param orders
     * @return
     */
    public PageInfo<Orders> findAllOrders(Orders orders, Integer pageNo, Integer pageSize, Date ordertimeMin,Date ordertimeMax,Double ordermoneyMin,Double ordermoneyMax);
    /**
     * 添加订单
     * @param orders
     * @return
     */
    public boolean addOrders(Orders orders, List<Orderdetails> orderdetails);
    /**
     * 根据订单编号查看订单详情
     * @param orderid
     * @return
     */
    public Orders findOrderDetails(String orderid);

    /**
     * 修改订单
     * @param orders
     * @return
     */
    public boolean updateOrders(Orders orders);

    /**
     * 修改订单和订单详情
     * @param orders
     * @param orderdetails
     * @return
     */
    public boolean updateOrdersAndOrdersDetails(Orders orders,List<Orderdetails> orderdetails);

    /**
     * 修改审核状态
     * @param orderid
     * @param uid
     * @return
     */
    public boolean updateStatus(String orderid,Integer uid);
    /**
     * 删除订单
     * @param orderid
     * @return
     */
    public boolean delOrders(String orderid);
    /**
     * 详情
     * @param orderid
     * @return
     */
    public Orders findOrderById(String orderid);

    public boolean editOrders(Orders orders);
}
